<?php

declare(strict_types=1);

/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://doc.hyperf.io
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
namespace App\Controller;
use Hyperf\HttpMessage\Cookie\Cookie;

class IndexController extends AbstractController
{
    public function index()
    {
        $username = trim($this->request->input('username', "guest"));
        $message = 'A message at '.date('Y-m-d H:i:s');
        $render = $this->container->get(\Hyperf\View\Render::class);
        return $render->render('index', ['username' => $username, 'message' => $message]);
    }
}
